package com.gxa.domain.entity;

import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;

import java.io.IOException;

public class ProductStatusSerializer extends JsonSerializer<Product.ProductStatus> {
    @Override
    public void serialize(Product.ProductStatus value, JsonGenerator gen, SerializerProvider provider)
            throws IOException {
        gen.writeString(value.getDesc()); // 输出中文描述
    }

}
